package org.wu.framework.log.platform.infrastructure.entity;

import lombok.Data;
import lombok.experimental.Accessors;
import org.wu.framework.lazy.orm.core.stereotype.LazyTableIndex;
import org.wu.framework.core.stereotype.LayerField;
import org.wu.framework.core.stereotype.LayerField.LayerFieldType;
import org.wu.framework.lazy.orm.core.stereotype.LazyTable;
import org.wu.framework.lazy.orm.core.stereotype.LazyTableField;
import org.wu.framework.lazy.orm.core.stereotype.*;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import java.lang.String;
import java.lang.Boolean;
/**
 * describe 请求日志 
 *
 * @author Jia wei Wu
 * @date 2024/03/25 04:20 下午
 * @see org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyInfrastructureEntity 
 **/
@Data
@Accessors(chain = true)
@LazyTable(tableName = "request_log",comment = "请求日志")
@Schema(title = "request_log",description = "请求日志")
public class RequestLogDO {


    /**
     * 
     * 
     */
    @Schema(description ="",name ="createTime",example = "")
    @LazyTableField(name="create_time",comment="",defaultValue="CURRENT_TIMESTAMP",upsertStrategy = LazyFieldStrategy.NEVER,extra="")
    private LocalDateTime createTime;

    /**
     * 
     * ip
     */
    @Schema(description ="ip",name ="ip",example = "")
    @LazyTableField(name="ip",comment="ip",columnType="varchar(255)")
    private String ip;

    /**
     * 
     * 操作系统
     */
    @Schema(description ="操作系统",name ="os",example = "")
    @LazyTableField(name="os",comment="操作系统",columnType="varchar(255)")
    private String os;

    /**
     * 
     * 请求ID
     */
    @Schema(description ="请求ID",name ="requestId",example = "")
    @LazyTableField(name="request_id",comment="请求ID",columnType="varchar(255)",key = true)
    private String requestId;

    /**
     * 
     * 请求方法
     */
    @Schema(description ="请求方法",name ="requestMethod",example = "")
    @LazyTableField(name="request_method",comment="请求方法",columnType="varchar(255)")
    private String requestMethod;

    /**
     * 
     * 请求参数
     */
    @Schema(description ="请求参数",name ="requestParameters",example = "")
    @LazyTableField(name="request_parameters",comment="请求参数",columnType="text")
    private String requestParameters;

    /**
     * 
     * 请求url
     */
    @Schema(description ="请求url",name ="requestUrl",example = "")
    @LazyTableField(name="request_url",comment="请求url",columnType="varchar(255)")
    private String requestUrl;

    /**
     * 
     * 请求是否成功
     */
    @Schema(description ="请求是否成功",name ="success",example = "")
    @LazyTableField(name="success",comment="请求是否成功",columnType="tinyint(1)")
    private Boolean success;

    /**
     * 
     * USER_AGENT
     */
    @Schema(description ="USER_AGENT",name ="userAgent",example = "")
    @LazyTableField(name="user_agent",comment="USER_AGENT",columnType="varchar(255)")
    private String userAgent;

    /**
     * 
     * 用户ID
     */
    @Schema(description ="用户ID",name ="userId",example = "")
    @LazyTableField(name="user_id",comment="用户ID",columnType="varchar(255)")
    private String userId;

}